package com.training.java.core.collections.post15;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

/**
 * this demo observes the students and their fav. fruit
 * 
 * @author soumya
 * 
 */
public class KeySetDemo {

	public static void main(String[] args) {

		Map<String, String> directory = new HashMap<String, String>();

		directory.put("Sushil", "Orange");
		directory.put("Siva", "Grapes");
		directory.put("Satya", "Apple");
		directory.put("Ravi", "Banana");
		directory.put("Reenu", "Pear");
		directory.put("Henry", "WaterMelon");
		directory.put("Ronnie", "Orange");
		directory.put("Mytri", "Kiwi");
		directory.put("Susmita", "melon");

		Set<String> keys = directory.keySet();

		for (String eachKey : keys) {

			String value = directory.get(eachKey);
			System.out.println("Keys =   " + eachKey + "  Value =   " + value);

		}

	}

}
